<!-- Generated automatically from an XML file of the same name.
     Copyright: Stephen J. Sangwine and Nicolas Le Bihan, 2008-2010.
--><html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <title>axis :: Functions (Quaternion Toolbox Function Reference)
</title><link rel="stylesheet" href="qtfmstyle.css" type="text/css"></head><body><h1>Quaternion Function Reference</h1><h2>axis</h2>
<p>Axis of quaternion.</p>
<h2>Syntax</h2><p><tt>Y = axis(X)</tt></p>
<h2>Description</h2>
<p>
If Q = a + &#956; .* b where a and b are real/complex, and &#956; is a unit pure
quaternion, then <tt>axis(Q) = &#956;</tt>.
</p>
<p>
The polar form of a quaternion is q = A exp(&#956;&#952;) where A is a real or complex
modulus, &#956; is a unit pure quaternion, and &#952; is an angle. It is &#956; that is
computed by this function.
</p>

<h2>Examples</h2>
<pre>
&gt;&gt; axis(qi + qj + qk)
 
ans = 0.5774 * I + 0.5774 * J + 0.5774 * K

&gt;&gt; axis(1 + qi + qj + qk)
 
ans = 0.5774 * I + 0.5774 * J + 0.5774 * K
</pre>

<h2>See Also</h2>QTFM function: <a href="angle.html">angle</a><br>
<h4>&copy; 2008-2010 Stephen J. Sangwine and Nicolas Le Bihan</h4><p><a href="license.html">License terms.</a></p></body></html>